package cn.kgc.fcm.dsbank.enumtest;

public class EnumTest03 {

    public enum ResultEnumDemo{
        SUCCESS(200,"ok"),
        ERROR(400,"ERROR");

        private Integer code;
        private String msg;


        public Integer getCode() {
            return code;
        }

        public String getMsg() {
            return msg;
        }

        ResultEnumDemo(Integer code, String msg) {
            this.code = code;
            this.msg = msg;
        }
    }

    public static void main(String[] args) {
        ResultEnumDemo resultEnum01 = ResultEnumDemo.SUCCESS;
        ResultEnumDemo resultEnum02 = ResultEnumDemo.ERROR;
        System.out.println(resultEnum01.getCode()+"\t"+resultEnum01.getMsg());
        System.out.println(resultEnum02.getCode()+"\t"+resultEnum02.getMsg());
    }

}
